import React from 'react';
import {Image,Text,View,NativeModules} from 'react-native';
import {
    createStackNavigator
} from 'react-navigation';

import App from '../views/App.js';
import Login from '../views/login';
import selford from '../views/selfording';
import Office from '../views/office';
import Store from '../views/store';
import Settings from '../views/settings';
import Report from '../views/report';
import Employees from '../views/employees';

const router = {
    app:{
        screen:App
    },
    ...addKeys([
        Login,
        selford,
        Office,
        Store,
        Settings,
        Report,
        Employees,
    ]),
};
function addKeys(mRouters){
    let r = {};
    for (let route of mRouters){
        for(k in route){
            r[k] = route[k];
        }
    }
    return r;
}

export default createStackNavigator(router,{
    initialRouteName:"home",
    headerMode:"none"
});